let ServerUrl = "http://127.0.0.1:3000"


function Request(url, data,token) {
	
		return new Promise((resolve, reject) => {
			uni.request({
				url: `${ServerUrl}${url}`,
				method:"POST",
				header: {
					Authorization: token
				},
				data,
				success( res ) {
					resolve(res)
				},
				fail( err ) {
					reject(err)
				}
			})
		})

}
module.exports = Request